import './style/main.css'
import 'element-plus/dist/index.css'
import './style/index.scss'
import { createApp } from 'vue'
import App from './App.vue'
import lang from 'element-plus/lib/locale/lang/zh-cn'
import ElementPlus from 'element-plus'
import router from './router/index'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import pinia from './stores/index'
import setStyle from './config/styleSetting'
import i18n from './i18n/index'

const app = createApp(App)
app.use(pinia)
app.use(ElementPlus, {
  locale: lang,
})
app.use(router)
app.use(setStyle)
app.use(i18n)
app.mount('#app')

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
